import axios from '../../../utils/http'
// 查询7s当前用户检查 /ise7sInspect/7sInspectProgress
export async function get7sCheck(parameter) {
  const {
    data
  } = await axios.get('/ise7sInspect/7sInspect' + parameter)
  return data
}

// 添加 7s检查 /ise7sInspect/ise7sInspect
export async function add7sCheck(arrange, clear, economize, feedback, id, praise, rectify, remarks, repair, requires,
  safe, teaNumbers) {
  const {
    data
  } = await axios.post('/ise7sInspect/ise7sInspect', {
    arrange: arrange,
    clear: clear,
    economize: economize,
    feedback: feedback,
    id: parseInt(id),
    image: null,
    praise: praise,
    rectify: rectify,
    remarks: remarks,
    repair: repair,
    requires: requires,
    safe: safe,
    teaNumbers: teaNumbers,


  })
  return data
}


// 修改 7s检查 /ise7sInspect/ise7sUpdate
export async function updata7sCheck(arrange, clear, economize, inspectId, praise, rectify, remarks, repair, requires,
  safe, teaNumbers) {
  const {
    data
  } = await axios.put('/ise7sInspect/ise7sUpdate', {
    arrange: arrange,
    clear: clear,
    economize: economize,
    inspectId: inspectId,
    praise: praise,
    rectify: rectify,
    remarks: remarks,
    repair: repair,
    requires: requires,
    safe: safe,
    teaNumbers: teaNumbers

  })
  return data
}

// 查询7s当前用户进度条 /ise7sInspect/7sInspectProgress /teacher/teacherListByLikeName
export async function get7sProgress() {
  const {
    data
  } = await axios.get('/ise7sInspect/7sInspectProgress')
  return data
}

// 查询7s老师列表的模糊查询  /teacher/teacherListByLikeName
export async function getTeacherListByLikeName(parameter) {
  const {
    data
  } = await axios.get('/cms/teacher/userListByLikeName',{
    params:{
      name: parameter
    }
  })
  return data
}


// 查询7s当前用户已经完成检查 /ise7sInspect/detail7sInspect/
export async function get7sCheckHistory(parameter) {
  const {
    data
  } = await axios.get('/ise7sInspect/finish7s' + parameter)
  return data
}

// 查询7s详细检查 /ise7sInspect/detail7sInspect/
export async function get7sCheckDetails(parameter) {
  const {
    data
  } = await axios.get('/ise7sInspect/detail7sInspect/' + parameter)
  return data
}

// 查询7s反馈列表 /ise7sInspect/feedback7s /ise7sInspect/all7s
export async function get7sCheckFeedback(parameter) {
  const {
    data
  } = await axios.get('/ise7sInspect/feedback7s' + parameter)
  return data
}

// 填写 7s反馈  /ise7sInspect/feedback7s
export async function write7sFeedback(id, result) {
  const {
    data
  } = await axios.put('/ise7sInspect/feedback7s', {
    id: id,
    result: result

  })
  return data
}

// 查询7s全部检查列表 /ise7sInspect/all7s
export async function getAll7sCheck(parameter) {
  const {
    data
  } = await axios.get('/ise7sInspect/all7s' + parameter)
  return data
}
